<?php
class Default_Form_Recharge extends Zend_Form
{
    public function init()
    {
        $this->setName("default");                                
                                                                    
        $pin = new Zend_Form_Element_Text('pin_card');
        $pin->setLabel('Mã thẻ cào (*)')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
        $pin->setAttrib('class','form-control');
                        
        $ser = new Zend_Form_Element_Text('card_serial');
        $ser->setLabel('Seri thẻ (*)')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
        $ser->setAttrib('class','form-control');                                
         
        $type = new Zend_Form_Element_Select('type_card');
        $type->setLabel('Loại thẻ cào (*)');                                                
        $type->addMultiOption('VNP','VinaPhone');    
        $type->addMultiOption('VMS','MobiPhone');
        $type->addMultiOption('VIETTEL','Viettel');
        $type->setAttrib('class','form-control');
                                         
        // submit button
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Thực hiện');
        $submit->removeDecorator('HtmlTag')->removeDecorator('DtDdWrapper');
        $submit->setAttrib('class','btn btn-default');                               
                
        // add elements to form
        $this->addElements(array (
            $pin, $ser, $type, $submit
        ));   
                                     
    }
}

